<#import "base.ftl" as base/>
<#import "spring.ftl" as spring/>

<@base.baseTemplate title="scanstatistic">
	
	<form name="scanstatistic" action="" method="post">
		<div class="line"><label><@spring.message "startDate"/>: <input class="daterange from" type="text" name="startDate" value="${startDate}" /></div>
		<div class="line"><label><@spring.message "endDate"/>: <input class="daterange to" type="text" name="endDate" value="${endDate}" /></div>
		
		<div class="line"><input type="submit" value="<@spring.message "refresh"/>" class="submit button" /></div>
		<br /><br />
		<div class="line">
			<table cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td width="180px"><b><@spring.message "amountComputerScansInPeriod"/>:</b></td>
					<td>${amountComputerScans}</td>
				</tr>
				<tr>
					<td width="180px"><b><@spring.message "amountComputersScannedInPeriod"/>:</b></td>
					<td>${amountComputersScanned}</td>
				</tr>
			</table>
		</div>
		<br /><br />
		<#if (result_list?size > 0)>
			<div class="line"><label><@spring.message "computersScanned"/>:</label></div><br />
			<div class="line">
				<table class="ui-widget">
					<thead class="ui-widget-header">
						<tr>
					  		<th><@spring.message "computerName"/></th>
					  		<th><@spring.message "ipAddress"/></th>
					  		<th><@spring.message "type"/></th>
					  		<th><@spring.message "cpuType"/></th>
					  		<th><@spring.message "operatingSystem"/></th>
					  	</tr>
					</thead>
					<tbody class="ui-widget-content">
					  	<#list result_list as scanresult>
					  		<tr>
							  	<td><a href="${rc.getContextPath()}/scan/${scanresult.id}">${scanresult.computerName!}</a></td>
								<td>${scanresult.scanIpAddress!}</td>
								<td><@spring.message "pctype.${scanresult.computerType!}"/></td>
								<td>${scanresult.cpu!}</td>
							  	<td>${scanresult.operatingSystem!}</td>
					  		</tr>
						</#list>
					</tbody>
				</table>
			</div>
		</#if>
	</form>
</@base.baseTemplate>